//
//  XCommon.swift
//  WeiboForAll
//
//  Created by 放学跟鸽走 on 2017/3/31.
//  Copyright © 2017年 放学跟鸽走. All rights reserved.
//

import Foundation
//用户登录回调页面地址
let XRedirect_uri = "https://www.baidu.com"
//AppKey
let XClient_id = "4173250745"
//微博程序加密信息
let XAppSecrect = "fbfc8e40fa442a0689d292b4b726c8a4"
//MARK:定义全局通知
//用户需要登录的通知
let XUserShouldLoginNotification = "XUserShouldLoginNotification"
/// 用户登录成功通知
let XUserLoginSuccessedNotification = "XUserLoginSuccessedNotification"


/// MARK: - 照片浏览通知定义
/// @param selectedIndex    选中照片索引
/// @param urls             浏览照片 URL 字符串数组
/// @param parentImageViews 父视图的图像视图数组，用户展现和解除转场动画参照
/// 微博 Cell 浏览照片通知
let XStatusCellBrowserPhotoNotification = "XStatusCellBrowserPhotoNotification"
/// 选中索引 Key
let XStatusCellBrowserPhotoSelectedIndexKey = "XStatusCellBrowserPhotoSelectedIndexKey"
/// 浏览照片 URL 字符串 Key
let XStatusCellBrowserPhotoURLsKey = "XStatusCellBrowserPhotoURLsKey"
/// 父视图的图像视图数组 Key
let XStatusCellBrowserPhotoImageViewsKey = "XStatusCellBrowserPhotoImageViewsKey"


// MARK: - 微博配图视图常量
// 配图视图外侧的间距
let XStatusPictureViewOutterMargin = CGFloat(12)
// 配图视图内部图像视图的间距
let XStatusPictureViewInnerMargin = CGFloat(3)
// 视图的宽度的宽度
let XStatusPictureViewWidth = UIScreen.cz_screenWidth() - 2 * XStatusPictureViewOutterMargin
// 每个 Item 默认的宽度
let XStatusPictureItemWidth = (XStatusPictureViewWidth - 2 * XStatusPictureViewInnerMargin) / 3

/// 微博 Cell 控件间距
let StatusCellMargin: CGFloat = 12
/// 微博 Cell 头像大小
let StatusIconWidth: CGFloat = 35

//公共print
public func printLog<T>(message: T,
                     file: String = #file,
                     method: String = #function,
                     line: Int = #line)
{
    #if DEBUG
        print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
    #endif
}
